#include "KeywordProcessor.h"
#include "PageProcessor.h"
#include <iostream>

using std::cout;
using std::cerr;
using std::endl;


int main() {
    // // 提供“停用词”文件以构造keyword处理器
    // KeyWordProcessor kwProcessor{"./corpus/stopwords/en_stopwords.txt", 
    //                              "./corpus/stopwords/cn_stopwords.txt"};
    
    // // 指定语料库目录，根据语料文件生成词典库和索引库
    // kwProcessor.process("./corpus/EN", "./corpus/CN");

    // 生成网页库、网页偏移库、倒排索引库
    PageProcessor pageProcessor{"./corpus/stopwords/cn_stopwords.txt"};
    pageProcessor.process("./corpus/webpages/");


    cout << "done\n";
    
    return 0;
}


// 测试编译指令：
// g++ main.cpp KeywordProcessor.cc 
// g++ main.cpp PageProcessor.cc -ltinyxml2 -g